Optimal. Leaf size=243 \[ \frac {2 (9 B-C) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}-\frac {2 (3 B-19 C) \tan (c+d x) \sec ^2(c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}+\frac {\sqrt {2} (B-C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (93 B-29 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 a d}-\frac {4 (111 B-143 C) \tan (c+d x)}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.88, antiderivative size = 243, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4072, 4021, 4010, 4001, 3795, 203} \[ \frac {2 (9 B-C) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}-\frac {2 (3 B-19 C) \tan (c+d x) \sec ^2(c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}+\frac {\sqrt {2} (B-C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (93 B-29 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 a d}-\frac {4 (111 B-143 C) \tan (c+d x)}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3795
Rule 4001
Rule 4010
Rule 4021
Rule 4072
Rubi steps
\begin {align*} \int \frac {\sec ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\int \frac {\sec ^5(c+d x) (B+C \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {\sec ^4(c+d x) \left (4 a C+\frac {1}{2} a (9 B-C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{9 a}\\ &=\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {4 \int \frac {\sec ^3(c+d x) \left (\frac {3}{2} a^2 (9 B-C)-\frac {3}{4} a^2 (3 B-19 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{63 a^2}\\ &=-\frac {2 (3 B-19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {8 \int \frac {\sec ^2(c+d x) \left (-\frac {3}{2} a^3 (3 B-19 C)+\frac {3}{8} a^3 (93 B-29 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{315 a^3}\\ &=-\frac {2 (3 B-19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (93 B-29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}+\frac {16 \int \frac {\sec (c+d x) \left (\frac {3}{16} a^4 (93 B-29 C)-\frac {3}{8} a^4 (111 B-143 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{945 a^4}\\ &=-\frac {4 (111 B-143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (3 B-19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (93 B-29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}+(B-C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=-\frac {4 (111 B-143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (3 B-19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (93 B-29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}-\frac {(2 (B-C)) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {2} (B-C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}-\frac {4 (111 B-143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (3 B-19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (9 B-C) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (93 B-29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.31, size = 183, normalized size = 0.75 \[ \frac {\tan (c+d x) \left (\frac {1}{4} \sqrt {1-\sec (c+d x)} \sec ^4(c+d x) ((918 B-214 C) \cos (c+d x)-8 (69 B-157 C) \cos (2 (c+d x))+186 B \cos (3 (c+d x))-129 B \cos (4 (c+d x))-423 B-58 C \cos (3 (c+d x))+257 C \cos (4 (c+d x))+1279 C)+315 \sqrt {2} (B-C) \tanh ^{-1}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )\right )}{315 d \sqrt {1-\sec (c+d x)} \sqrt {a (\sec (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 465, normalized size = 1.91 \[ \left [-\frac {315 \, \sqrt {2} {\left ({\left (B - C\right )} a \cos \left (d x + c\right )^{5} + {\left (B - C\right )} a \cos \left (d x + c\right )^{4}\right )} \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, \cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (129 \, B - 257 \, C\right )} \cos \left (d x + c\right )^{4} - {\left (93 \, B - 29 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, B - 19 \, C\right )} \cos \left (d x + c\right )^{2} - 5 \, {\left (9 \, B - C\right )} \cos \left (d x + c\right ) - 35 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{630 \, {\left (a d \cos \left (d x + c\right )^{5} + a d \cos \left (d x + c\right )^{4}\right )}}, -\frac {2 \, {\left ({\left (129 \, B - 257 \, C\right )} \cos \left (d x + c\right )^{4} - {\left (93 \, B - 29 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, B - 19 \, C\right )} \cos \left (d x + c\right )^{2} - 5 \, {\left (9 \, B - C\right )} \cos \left (d x + c\right ) - 35 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {315 \, \sqrt {2} {\left ({\left (B - C\right )} a \cos \left (d x + c\right )^{5} + {\left (B - C\right )} a \cos \left (d x + c\right )^{4}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{315 \, {\left (a d \cos \left (d x + c\right )^{5} + a d \cos \left (d x + c\right )^{4}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.54, size = 391, normalized size = 1.61 \[ \frac {\frac {315 \, {\left (\sqrt {2} B - \sqrt {2} C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} - \frac {2 \, {\left (\frac {315 \, \sqrt {2} C a^{4}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} + {\left (420 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 840 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (756 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 1638 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (612 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 936 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (276 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - 383 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{315 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.60, size = 975, normalized size = 4.01 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \sec \left (d x + c\right )^{4}}{\sqrt {a \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^4\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \sec ^{5}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________